﻿--Check the version to avoid duplicate update
declare @versionId nvarchar(50) 
SELECT @versionId = 'Version1'
if EXISTS (select VersionId from __DataVersion where VersionId = @versionId )
BEGIN
	RETURN
END

--Insert version first
insert into __DataVersion (VersionId, Note) VALUES (@versionId, 'Version1 Desc')

/*
* Handle data changes here
*/
insert into Title (Id, Title) values (1, 'A')
insert into Title (Id, Title) values (2, 'SA')
insert into Title (Id, Title) values (3, 'VP')
insert into Title (Id, Title) values (4, 'SVP')
insert into Title (Id, Title) values (5, 'D')
insert into Title (Id, Title) values (6, 'MD')
insert into Title (Id, Title) values (7, 'CEO')